16 COMPACT SPACES 57
from (3.15.2)). Conversely, suppose the condition satisfied, and let us prove
that the mapping/ defined by J(x) = lim f(y) is a solution of the extension

y-*jc,y e A
problem. First of all, if x e A, the existence of the limit implies by definition
/(*) =/(X)> hence / extends /, and it remains to see that / is continuous.
Let x e E, V a neighborhood of f(x) in E'; there is a closed ball B' of center
f(x) contained in V. By assumption, there is an open neighborhood V of x
in E such that/(V n A) e B' (by (3.13.1)). For any y e Vj(y) is the limit of
/at the point y with respect to A, hence also with respect to V n A, by (3.13.5);
hence, it follows from (3.13.7) that/00 e/(V n A), and therefore f(y) e B'
since B' is closed. Q.E.D.

(3.15.6) Let A be a dense subset of a metric space E, and f a uniformly
continuous mapping of
A into a complete metric space E'. Then there exists
a continuous mapping J of
E into E' coinciding with f in A; moreover, f is
uniformly continuous.

To prove the existence of/, it follows from (3.15.5) and (3.14.6) that we
have to show the oscillation of / at any point x e E, with respect to A,
is 0. Now, for any 8 > 0, there is 6 > 0 such that d(y, z) < 8 implies
d'(f(y\f(z)) < e/3 (y, z in A). Hence, the diameter of/(A n B(;c; 5/2)) is at
most e/3, which proves our assertion. Consider now any two points s, t in E
such that d(s91) < 6/2. There is a y 6 A such that d(s, y) < 6/4 and
d'(f(s),f(y)) < e/3, and a z e A such that d(t, z) < <5/4 and d'(J(t)9f(z)) < e/3.
From the triangle inequality it follows that d(y, z) < 6, and as y, z are in A,
d'(f(y),f(z)) <e/3; hence, by the triangle inequality, d'(f(s)J(t))<e; this
proves that / is uniformly continuous.

PROBLEM
Let n -*• rn be a bijection of N onto the set A of all rational numbers x such that 0 < x ^ 1
(2.2.15). We define a function in E « [0, 1] by putting/(x) = £ V2", the infinite sum being

rn<x
extended only to those n such that rn < x. Show that the restriction of/to the set B of all
irrational numbers x e [0, 1) is continuous, but cannot be extended to a function continuous
inE.

16. COMPACT SPACES
A metric space E is called compact if it satisfies the following condition
("Borel-Lebesgue axiom")- for every covering (UA)AeL of E by open sets